from django.db import models


# Create your models here.
# 学生类模型
class Student(models.Model):
    # 主键id
    student_no = models.AutoField(blank=True, unique=True, primary_key=True, verbose_name='学生编号')
    gender = models.IntegerField(default=1, verbose_name='性别', choices=(
        (1, '男'), (2, '女')
    ))  # 性别
    student_name = models.CharField(max_length=32, verbose_name='学生姓名', null=False)
    student_age = models.IntegerField(verbose_name='年龄', null=False)
    birthday = models.DateField(verbose_name='出生日期', null=False)  # 出生日期
    weight = models.FloatField(verbose_name='体重 单位(Kg)', null=False)  # 体重
    height = models.IntegerField(verbose_name='身高 单位(cm)', null=False)  # 身高
    introduce = models.TextField(verbose_name='个人简介', null=True)  #
    photo = models.ImageField(verbose_name='照片', null=False)  # 照片
    student_class = models.IntegerField(verbose_name='班级编号', null=True)
    student_class_name = models.CharField(max_length=32, null=True, verbose_name='班级名称')
    del_flag = models.IntegerField(default=1, null=False, verbose_name='删除标记 1-正常 2-删除')
    create_time = models.DateTimeField(null=True, verbose_name='创建时间')
    update_time = models.DateTimeField(null=True, verbose_name='修改时间')

